
#include "stdafx.h"
#include "game/Game.h"


int main()
{
	auto window = GlfwUtils::createWindow("openGL Demo", WINDOWS_W, WINDOWS_H);
	if (window == nullptr)	return -1;

	std::cout << "game" << std::endl;

	// test 
	glm::vec4 vec(1.0f, 0.0f, 0.0f, 1.0f);
	glm::mat4 trans;
	trans = glm::translate(trans, glm::vec3(1.0f, 1.0f, 0.0f));
	vec = trans * vec;
	std::cout << "mat --- " << vec.x << vec.y << vec.z << std::endl;

	Game* game = &SINGLETON(Game);
	game->init(window);

	while (!glfwWindowShouldClose(window))
	{
		game->run(0.0f);
	}
	game->release();
	SINGLETON(InstanceManager).clear();
	return 0;
}
